1 : <?php
2 : /*--------------------------------------------------------------------------+
3 : This file is part of eStudy.
4 : courses/classes/class.Leaf.inc.php
5 : - Modulgruppe: Kurse
6 : - Beschreibung: Klasse fuer Blaetter des Baumes.
7 : - Version: 0.2, 11/12/05
8 : - Autor(en): Christoph Gockel <christoph.gockel@mni.fh-giessen.de>
9 : +---------------------------------------------------------------------------+
10 : This program is free software; you can redistribute it and/or
11 : modify it under the terms of the GNU General Public License
12 : as published by the Free Software Foundation; either version 2
13 : of the License, or any later version.
14 : +---------------------------------------------------------------------------+
15 : This program is distributed in the hope that it will be useful,
16 : but WITHOUT ANY WARRANTY; without even the implied warranty of
17 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 : GNU General Public License for more details.
19 : You should have received a copy of the GNU General Public License
20 : along with this program; if not, write to the Free Software
21 : Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 : +--------------------------------------------------------------------------*/
23 :
24 : /** Knotenobjekte*/
25 : require_once PATH_TO_ROOT."courses/classes/class.node.inc.php";
26 :
27 : /**
28 : * <code>Leaf</code> stellt einen Blatteintrag im Baum dar.
29 : * @package eStudy.Courses
30 : * @author Christoph Gockel <christoph.gockel@mni.fh-giessen.de>
31 : * @version 0.2, 11/12/05
32 : */
33 :
34 : class Leaf extends Node
35 : {
36 : /**
37 : * Erstellt ein neues Blattobjekt mit der Id <code>$id</code>, dem Titel/der Beschriftung <code>$caption</code>
38 : * und einer Referenz auf das Objekt auf welches das Blatt verweisen soll.
39 : */
40 : function Leaf($id, $parentId, $caption, $reference = null, $leafType = 'leaf')
41 : {
42 0 : parent::Node($id, $parentId, $caption);
43 0 : $this->_child =& $reference;
44 0 : $this->_type = $leafType;
45 0 : }
46 :
47 : /**
48 : * Die Stringdarstellung des Blatteintrags.
49 : */
50 : function __toString()
51 : {
52 0 : return "Object Leaf($this->_id, $this->_caption)";
53 : }
54 :
55 : }
|